The Qt Installer Framework provides a set of tools and utilities to create
installers for the supported desktop Qt platforms: Linux, Microsoft Windows, and
OS X.


Documentation
--------------------------

The binary packages for the Qt Installer Framework include documentation in the
doc directory. The documentation is also available online at
    https://doc.qt.io/qtinstallerframework/index.html

Notes
--------------------------

To build an installer, it is advised to use a statically linked Qt (5.4 or
newer).

See the documentation at
    https://doc.qt.io/qtinstallerframework/ifw-getting-started.html

Getting Help
--------------------------

If you think you found a bug, please report it to

https://bugreports.qt.io/browse/QTIFW

General questions are best asked on interest@qt-project.org.
--------------------------

Build qt statically

In this post I will describe how to build Qt 5.6 statically for Windows using MSVC 14 compiler or in other words Microsoft Visual C++ 2015 which is included in Microsoft Visual Studio 2015. Quite obviously you need to install Microsoft Visual Studio 2015 (Community edition is free) before continuing with this guide. You can find it here: https://www.visualstudio.com/

Next, you need to download the latest sources (in this case 5.6.3) of Qt from here: https://download.qt.io/archive/qt/5.7/5.7.0/single/

Create a folder named Static under default Qt installation.

C:\Qt\Static
Copy downloaded Qt archive to this folder and extract it there. So you will have a folder containing all Qt sources here:

C:\Qt\Static\qt-everywhere-opensource-src-5.6.3
Now go to C:\Qt\Static\qt-everywhere-opensource-src-5.6.3\qtbase\mkspecs\common and change msvc-desktop.conf like this (change all MD to MT to remove dependency on msvc dlls, only in the following lines.)

initial values:

QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
QMAKE_CFLAGS_DEBUG = -Zi -MDd
should be changed to:

QMAKE_CFLAGS_RELEASE = -O2 -MT
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
QMAKE_CFLAGS_DEBUG = -Zi -MTd

 
Now press Start and run “Developer Command Prompt for VS2015” as Administrator.

Change directory using CD command to “C:\Qt\Static\qt-everywhere-opensource-src-5.6.3” where you extracted Qt source code.

Enter the following command to configure your Qt build in static mode. (You can get all configure options here but below is the minimum options I use which includes most widely used stuff.)

configure -static -debug-and-release -prefix "C:\Qt\Static\5.6.3" -platform win32-msvc2015 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -qt-sql-odbc -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests
When configuration is completed, run the following command to start the build process. Go grab a cup of coffee cause it’s going to take some time.

nmake
When building is completed, you need to enter one last command to get a ready to use static build kit in “C:\Qt\5.7.0”

nmake install
And it’s done.

From (https://amin-ahmadi.com/2016/09/22/how-to-build-qt-5-7-statically-using-msvc14-microsoft-visual-studio-2015/)